#ifndef SERVERDEV_H
#define SERVERDEV_H

#include <QTimer>
#include <QWidget>
#include <QThreadPool>
#include "company.h"


QT_BEGIN_NAMESPACE
namespace Ui { class ServerDev; }
QT_END_NAMESPACE

typedef struct _AGENT_DEV_
{
    _AGENT_DEV_()
    {}
    _AGENT_DEV_(QString _ip,QString _community,QList<QString> _oidlist)
    {
        ip = _ip;
        community = _community;
        oidList = _oidlist;
    }
    QString ip = "127.0.0.1";
    QString community = "public";
    QList<QString> oidList;
}AgentDev;

class Task;
class ServerDev : public QWidget
{
    Q_OBJECT

public:
    ServerDev(QWidget *parent = nullptr);
    ~ServerDev();

private slots:
    void onTimeOut();

    void on_getBtn_clicked();

    void on_getClearBtn_clicked();

    void on_setBtn_clicked();

    void on_setClearBtn_clicked();

public slots:
    void sltOidContent(const QString &strCnt);

private:
    Ui::ServerDev *ui;

    Task *m_pTask;

    QTimer *m_pTimer;

    QThreadPool *m_pThreadPool;

    QList<AgentDev> m_agentDevList;

    company m_company;

};
#endif // SERVERDEV_H
